﻿@{
    ViewBag.Title = "模型列表";
    Layout = "~/Views/Shared/_Main.cshtml";
}
@section Head{
    <style>
        .modelType
        {
            height: 470px;
            padding-left: 5px;
            padding-right: 5px;
        }
        #msg
        {
            color: #ff0000;
        }
        .ov
        {
            overflow-y: scroll;
        }
    </style>
    <script type="text/javascript">
        var UrlArray = $.getUrlArray();
        var retArr = new Array();
        var opts = {
            rows: 10,
            height: 450,
            url: "/ModelConfig/GetRefModelList",
            para: { modelID: UrlArray["modelID"], dbName: encodeURI(UrlArray["dbName"]) },
            idField: "GUID",
            columns: [
                    { field: 'TableName', title: '模型名称', width: 38, sortable: true },
                    { field: 'TableDescription', title: '模型描述', width: 40, sortable: true },
                    { field: 'TypeName', title: '模型分类', width: 10, align: 'center', sortable: true },
                    { field: 'CreateTime', title: '创建时间', width: 12, align: 'center', sortable: true }
                    ]
        };
        $(function () {
            InitList();
        });

        function InitList() {
            opts.para["tableName"] = $("#txt_TableName").val();
            $("#DataGrid2").dg(opts);
        }
        function btnSearch() {
            InitList();
        }
        function back() {
            window.location = "/ModelConfig/index?dbName=" + encodeURI(UrlArray["dbName"]);
        }

        function save() { 
            returnParent("1");
            return false;
        } 
    </script>
}
<div id="div_main" class="modelType ov">
    <table class="listTitle">
        <tr>
            <td width="15">
                <img src="/images/search.png" />
            </td>
            <td width="300">
                模型配置搜索
            </td>
            <td align="right">
                <input type="button" value="确定" class="button" onclick="save()" />
                <input type="button" value="关闭" class="button" onclick="window.close()" />
            </td>
        </tr>
    </table>
    <table class="searchArea" width="100%">
        <tr>
            <td>
                模型名称：
                <input type="text" id="txt_TableName" style="width: 300px;" />
                <input type="button" value="搜索" class="button" onclick="btnSearch()" />
            </td>
        </tr>
    </table>
    <table class="listTitle">
        <tr>
            <td width="15">
                <img src="/images/filesave.png" />
            </td>
            <td width="300">
                模型配置列表<span id="type_Name"></span>
            </td>
            <td align="right">
            </td>
        </tr>
    </table>
    <table id="DataGrid2" class="pagTable" cellpadding="0" cellspacing="0">
    </table>
    <div>
        <div id="Pagination" class="pagination">
        </div>
        <div id="loading" class="loading">
            <img src="/Images/tree_loading.gif" />
        </div>
    </div>
    <div id="msg">
       <br /><br /> 修改配置后，将影响如上模型，如要继续请点击上方“确定”按钮。
    </div>
</div>
